//
//  FileIO.h
//  sad
//
//  Created by Christopher Kemsley on 2/11/12.
//  Copyright (c) 2012 iAppolopolis. All rights reserved.
//

#ifndef sad_FileIO_h
#define sad_FileIO_h

#include "URL.hpp"
#include <string>
#include <map>
#include "Exception.hpp"

NamespaceBegin



class	FileIO
{
public:
	
	static std::string const&	contentsOfURL	( URL const & url ) ;
	
	static	void	mapVirtualFile	( URL const & url , std::string const & contents ) ;
	
	
	
private:
	static std::map<URL,std::string>&	_cache () ;
	static void		_fetchURL	( URL const & url , std::string & str ) ;
} ;


NamespaceEnd

#endif
